<template>
  <div class="leftBottom">
    <div class="headerMaintitle">
      <img class="topPic" src="../assets/rightBottom3.png" alt="" />
      <div class="headerText">标题1</div>
    </div>
    <div class="content">
      <div class="countDiv">
        <div class="circle">
          <img src="../assets/numbg_green.png" alt="" />
          <span class="count">0</span>
          <span class="name">压力监测</span>
        </div>
        <div class="circle">
          <img src="../assets/numbg_green.png" alt="" />
          <span class="count">1</span>
          <span class="name">流量预警</span>
        </div>
        <div class="circle">
          <img src="../assets/numbg_green.png" alt="" />
          <span class="count">2</span>
          <span class="name">液位预警</span>
        </div>
      </div>
      <div class="tableDiv">
        <p class="tableHead">
          <span>时间</span>
          <span>监测点</span>
          <span>信息</span>
        </p>
        <div class="tableBodyDiv">
          <vue-seamless-scroll
            class="scroll_box"
            :data="dataList"
            :class-option="defineScroll"
            style="
              height: 100%;
              overflow: hidden;
              width: 100%;
              color: white;
              font-size: 18px;
              text-align: center;
            "
          >
            <p class="tableBody" v-for="(item, index) in dataList" :key="index">
              <span :title="item.entName">{{ item.entName }}</span>
              <span>{{ item.tax }}</span>
              <span class="action">{{ item.evaluate }}</span>
            </p>
          </vue-seamless-scroll>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  name: "LeftBottom",
  props: {},
  components: {},
  data() {
    return {
      dataList: [
        {
          entName: "2024-06-25 06:02:41",
          tax: "纺织小区二供泵房",
          evaluate: "液位上限超限",
        },
        {
          entName: "2024-06-26 06:02:41",
          tax: "纺织小区二供泵房",
          evaluate: "液位上限超限",
        },
        {
          entName: "2024-06-25 06:02:41",
          tax: "纺织小区二供泵房",
          evaluate: "液位上限超限",
        },
        {
          entName: "2024-06-26 06:02:41",
          tax: "纺织小区二供泵房",
          evaluate: "液位上限超限",
        },
        {
          entName: "2024-06-25 06:02:41",
          tax: "纺织小区二供泵房",
          evaluate: "液位上限超限",
        },
        {
          entName: "2024-06-26 06:02:41",
          tax: "纺织小区二供泵房",
          evaluate: "液位上限超限",
        },
        {
          entName: "2024-06-25 06:02:41",
          tax: "纺织小区二供泵房",
          evaluate: "液位上限超限",
        },
        {
          entName: "2024-06-26 06:02:41",
          tax: "纺织小区二供泵房",
          evaluate: "液位上限超限",
        },
      ],
      defineScroll() {
        return {
          step: 0.5, // 数值越大速度滚动越快
          limitMoveNum: 2, // 开始无缝滚动的数据量 this.dataList.length
          hoverStop: true, // 是否开启鼠标悬停stop
          direction: 1, // 0向下 1向上 2向左 3向右
          openWatch: true, // 开启数据实时监控刷新dom
          singleHeight: 0, // 单步运动停止的高度(默认值0是无缝不停止的滚动) direction => 0/1
          singleWidth: 0, // 单步运动停止的宽度(默认值0是无缝不停止的滚动) direction => 2/3
          waitTime: 1000, // 单步运动停止的时间(默认值1000ms)
        };
      },
    };
  },
  computed: {},
  watch: {},
  methods: {},
  beforeCreate() {},
  created() {},
  beforeMount() {},
  mounted() {
    this.init();
  },
  updated() {},

  activated() {},
  deactivated() {},
  beforeDestroy() {},
  destroyed() {},
};
</script>
<style lang="less" scoped>
.leftBottom {
  margin-top: 20px;
}
.content {
  width: 100%;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  .countDiv {
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding-top: 10px;
    .circle {
      width: 33%;
      font-size: 24px;
      font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
      font-weight: 500;
      color: #ffffff;
      line-height: 60px;
      display: flex;
      flex-direction: column;
      align-items: center;
      position: relative;
      .count {
        position: absolute;
        font-size: 40px;
        font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
        font-weight: 800;
        color: #00feff;
        line-height: 102px;
        background: linear-gradient(360deg, #00beda 0%, #00ffc6 99%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        top: -12px;
      }
      .name {
        position: absolute;
        top: 95px;
      }
      img {
        width: 160px;
        margin-bottom: 4px;
      }
    }
  }
  .tableDiv {
    width: 100%;
    p {
      margin-bottom: 4px;
    }
    .tableHead {
      margin-top: 14px;
      display: flex;
      height: 60px;
      line-height: 60px;
      background: rgba(53, 106, 255, 0.43);
      font-size: 20px;
      font-family: PingFangSC, PingFang SC;
      font-weight: 600;
      color: #ffffff;
      span {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        &:nth-child(1) {
          padding-left: 25px;
          box-sizing: border-box;
          text-align: left;
          width: 253px;
        }
        &:nth-child(2) {
          width: 209px;
        }
        &:nth-child(3) {
          flex: 1;
        }
      }
    }
    .tableBodyDiv {
      height: 340px;
      overflow: auto;
    }
    .tableBody {
      display: flex;
      height: 60px;
      line-height: 60px;
      font-size: 20px;
      font-family: PingFangSC, PingFang SC;
      font-weight: 400;
      color: #b1e5ffff;
      background: rgba(176, 218, 239, 0.12);
      span {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        &:nth-child(1) {
          padding-left: 25px;
          box-sizing: border-box;
          text-align: left;
          width: 253px;
        }
        &:nth-child(2) {
          width: 209px;
        }
        &:nth-child(3) {
          flex: 1;
        }
      }
      .action {
        font-family: PingFangSC, PingFang SC;
        font-weight: 600;
        color: #fcd44f;
      }
    }
  }
}
</style>
